Device and method for providing feedback on breathing rate

ABSTRACT

Devices and methods for providing feedback on breathing rate are disclosed. The device comprises: a sensor interface configured to receive an electrocardiogram ECG signal; an ECG analysis unit configured to obtain a breathing rate from the received ECG signal; a feedback output mechanism for providing feedback; and a feedback generator configured to obtain an optimal breathing rate in accordance with a desired outcome and one or more heart rate and/or breathing rate characteristics detected from the ECG signal. The feedback generator is further configured to control the feedback output mechanism to output feedback synchronised to the optimal breathing rate, and subsequently adapt the feedback in accordance with changes in the one or more heart rate and/or breathing rate characteristics while the feedback is being outputted.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to GB Patent Application No. 1506143.5,filed at the British Patent Office on Apr. 10, 2015, the disclosure ofwhich is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

The present disclosure relates to providing feedback regarding breathingrate. In particular, the present disclosure relates to providingadaptive feedback in relation to the breathing rate, based on anelectrocardiogram (ECG) signal.

BACKGROUND

Breathing exercises are widely used to achieve various physiologicalbenefits. For example, in a clinical context breathing exercises havebeen developed which can aid a patient in reducing their blood pressure,or assist in pain management. Breathing techniques can also help inmanaging stress levels.

In recent years, devices have been developed which can help a user tocontrol their breathing in accordance with a desired breathing pattern.In one such prior art device, music is played to indicate to a user whento inhale and exhale. The device gradually prolongs the exhalation tonein a pre-programmed manner to encourage the user to slow theirbreathing.

The invention is made in this context.

SUMMARY

According to a first aspect of the present disclosure, there is provideda device comprising: a sensor interface configured to receive anelectrocardiogram ECG signal; an ECG analysis unit configured to obtaina breathing rate from the received ECG signal; a feedback outputmechanism for providing feedback; and a feedback generator configured toobtain an optimal breathing rate in accordance with a desired outcomeand one or more heart rate and/or breathing rate characteristicsdetected from the ECG signal, control the feedback output mechanism tooutput feedback synchronised to the optimal breathing rate, andsubsequently adapt the feedback in accordance with changes in the one ormore heart rate and/or breathing rate characteristics while the feedbackis being outputted.

The feedback generator can be configured to generate a feedback controlsignal having values ranging from a first limit to a second limit, thefirst limit corresponding to a defined point in an exhalation phase andthe second limit corresponding to a defined point in an inhalationphase, and the feedback output mechanism can be configured to providethe feedback in accordance with the feedback control signal.

The feedback generator can be configured to: obtain a first filteredsignal by applying a moving average filter with a first time window tothe received ECG signal; obtain a second filtered signal by applying amoving average filter with a second time window to the received ECGsignal, the second time window being longer than the first time window;obtain a difference signal by subtracting the second filtered signalfrom the first filtered signal; determine a maximum value and a minimumvalue of the difference signal within a third time window; normalise thedifference signal relative to the control signal based on the determinedmaximum and minimum values, to obtain a normalised signal having valuesranging from the first limit of the control signal to the second limitof the control signal; and obtain a performance metric based on acorrelation between the normalised signal and the control signal, wherethe performance metric is related to how closely the breathing ratedetected from the ECG signal is matched to the optimal breathing rate.The first time window can be substantially equal to 3 seconds, and/orthe second time window can be substantially equal to 17 seconds.

The feedback can be configured to include cues for instructing a userwhen to inhale and when to exhale, in accordance with the determinedoptimal breathing rate.

The device can further comprise an abnormality detection mechanismconfigured to detect one or more predefined abnormalities based on thedetermined heart rate variability and/or breathing rate, and to signal adetected abnormality to the feedback generator, and the feedbackgenerator can be further configured to obtain the optimal breathing ratein accordance with the detected abnormality.

The device may further comprise a network interface for communicatingwith one or more other devices over a network. In some embodiments, theabnormality detection mechanism can be configured to detect the one ormore predefined abnormalities by transmitting the ECG signal to adiagnostic server via the network interface and receiving a diagnosticresult indicating whether any of the predefined abnormalities weredetected in the ECG signal, and/or the ECG analysis unit can beconfigured to obtain the breathing rate by transmitting the ECG signalto a server via the network interface, and receiving a messagecontaining the detected breathing rate via the network interface, and/orthe feedback generator can be configured to obtain the optimal breathingrate by querying a server via the network interface.

The feedback output mechanism can comprise a plurality of light sourcesdistributed across the device, the plurality of light sources beingcontrollable to emit visible light of different wavelengths inaccordance with the generated feedback.

The feedback output mechanism can comprise a speaker for outputting anaudio component of the generated feedback, and the feedback generatorcan be further configured to control the speaker to provide hapticfeedback in the form of low-frequency audio.

The device may be configured to be held and supported by a user, and thesensor interface can comprise first and second electrocardiographicelectrodes disposed on a surface of the device, the first and secondelectrocardiographic electrodes being arranged to detect the ECG signalwhen the device is held by the user. Additionally, in some embodimentsthe device further comprises a third electrocardiographic electrodearranged to contact both hands when the device is being held by theuser, wherein the ECG analysis unit is configured to measure a referencepotential from the third electrocardiographic electrode when receivingthe ECG signal through the first and second electrocardiographicelectrodes.

The ECG analysis unit can be configured to determine the breathing rateas being equal to a variation in peak amplitude of a pulse detected fromthe ECG signal.

According to a second aspect of the present disclosure, there isprovided a method comprising: receiving an electrocardiogram ECG signal;obtaining a breathing rate from the received ECG signal; obtaining anoptimal breathing rate in accordance with a desired outcome and one ormore heart rate and/or breathing rate characteristics detected from theECG signal; controlling a feedback output mechanism to output feedbacksynchronised to the optimal breathing rate; and subsequently adaptingthe feedback in accordance with changes in the one or more heart rateand/or breathing rate characteristics while the feedback is beingoutputted.

According to a third aspect of the present disclosure, there is provideda computer-readable storage medium arranged to store computer programinstructions which, when executed, perform any of the methods disclosedherein.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments will now be described, by way of example only, withreference to the accompanying drawings, in which:

FIG. 1 schematically illustrates a device for providing feedbackregarding breathing rate, according to an embodiment;

FIG. 2 is a flowchart showing a method for providing feedback regardingbreathing rate, according to an embodiment;

FIG. 3 is a flowchart showing a method of obtaining a performance metricrelated to how closely the breathing rate detected from the ECG signalis matched to the optimal breathing rate, according to an embodiment;

FIG. 4 illustrates a top view of a device for providing feedbackregarding breathing rate, according to an embodiment;

FIG. 5 illustrates a bottom view of the device of FIG. 4; and

FIG. 6 illustrates an exploded view of the device of FIG. 4.

DETAILED DESCRIPTION

Referring now to FIG. 1, a device for providing feedback regardingbreathing rate is schematically illustrated, according to an embodiment.As shown in FIG. 1, the device 100 comprises a sensor interface 101, anelectrocardiogram (ECG) analysis unit 102, a feedback generator 103, afeedback output mechanism 104, an abnormality detection mechanism 105, anetwork interface 106, and memory 107. The memory 107 can be any type ofsuitable non-transitory computer readable storage medium, and isarranged to store computer program instructions which, when executed,cause the device to perform various functions as disclosed herein. Thefeedback output mechanism 104 is configured to provide audiovisualfeedback to a user, and can include one or more audio output devices 104a and light sources 104 b. In the present embodiment the feedback outputmechanism includes a plurality of light emitting diodes (LEDs) 104 bwhich can be controlled to emit light of different wavelengths.

Depending on the embodiment, certain elements shown in FIG. 1 may beimplemented solely in hardware or software, or in a combination of both.For example, the feedback output mechanism 104 may include hardwarecomponents suitable for outputting audiovisual feedback, and the sensorinterface 101 and network interface 102 may include physical interfacecomponents such as jacks and/or antennas. However, other elements inwhich processing steps are performed, including the ECG analysis unit102, feedback generator 103 and abnormality detection mechanism 105 maybe implemented in software or hardware, or as a combination.

The device 100 further comprises first and second ECG electrodes 101 a,101 b through which the sensor interface 101 is configured to receive anECG signal. In the present embodiment the ECG electrodes 101 a, 101 bare included in the device 100, but in other embodiments the ECGelectrodes 101 a, 101 b may be physically separate from the device. Forexample, in some embodiments the sensor interface 101 may be configuredto receive an ECG signal wirelessly from a remote sensor, such as awearable chest strap ECG sensor including the ECG electrodes 101 a, 101b.

The ECG analysis unit 102 can be configured to execute variousanalytical functions on the ECG signal received through the sensorinterface 101. In the present embodiment the ECG analysis unit 102 isconfigured to obtain a breathing rate from the received ECG signal. Insome embodiments, in addition to obtaining the breathing rate the ECGanalysis unit 102 may be configured to perform other functions, forexample determining heart rate variability (HRV) from the ECG signal.

In the present embodiment the ECG analysis unit 102 is configured todetect the ECG signal as a differential signal via contact between theuser's hands and the first and second ECG electrodes 101 a, 101 b whilethe user is holding the device 100. The ECG analysis unit 102 of thepresent embodiment includes a digital gain control that allows thecircuit to operate correctly over a range of input signal levels. Thepeak amplitude of the ECG pulses correlates with the user's breathingrate once gain control has stabilised.

In the present embodiment the ECG analysis unit 102 is configured toamplify the voltage difference between the user's hands using amultistage amplifier with bandpass filtering. The multistage amplifierincludes a variable gain amplifier, and enables the ECG circuit to beadaptable over a wide range (20:1) of input signals under softwareand/or hardware control. For example, in the present embodiment thesecond stage amplifier is configured to have digitally controllablegain, and can be controlled via software or a Field Programmable GateArray (FPGA). However, in other embodiments different methods ofamplifying the ECG signal may be used, for example a single stageamplifier may be used instead of a multistage amplifier.

In the present embodiment, the amplified ECG signal is converted fromanalogue to digital by an analogue-to-digital converter (ADC). Thedigital signal can then be read into an FPGA or a processor. In thepresent embodiment the ADC is configured to sample the ECG signal at 200Hertz (Hz).

In the present embodiment the ECG analysis unit 102 is furtherconfigured to determine HRV from the ECG signal, by applying filteringto remove noise and enhance the QRS part of the signal. Variousalgorithms for estimating heart rate based on QRS events detected froman ECG signal are known in the art, and a detailed description will notbe provided here.

Although in the present embodiment the ECG analysis unit 102 isconfigured to determine the breathing rate as being equal to a variationin peak amplitude of a pulse detected from the ECG signal, other methodsof detecting the breathing rate are known in the art, and a detailedexplanation will not be provided here so as not to obscure the inventiveconcept. For example, the breathing rate may be determined based onother characteristics of the ECG signal, including the median or meanamplitude of the whole QRS event, or of only the negative part orpositive part.

Continuing with reference to FIG. 1, the feedback generator 103 isconfigured to obtain an optimal breathing rate in accordance with adesired outcome and one or more heart rate and/or breathing ratecharacteristics detected from the ECG signal. For example, the desiredoutcome may be to synchronise the user's breathing pattern according tothe Herbert-Benson breathing technique, or to provide pain relief byassisting the user in managing their heart rate and breathing rate, orto achieve general relaxation. The device may also be beneficial forindividuals with disorders that can create anxiety or anger, such asattention deficit hyperactivity disorder (ADHD), autism orpost-traumatic stress disorder (PTSD). Data captured by the device, suchas the raw ECG data and information about characteristics detected fromthe ECG signal, may be uploaded to a server to be reviewed by ahealthcare professional. A physician may then be able to adjust apatient's medication regime or other treatment in accordance with theuploaded data, for example by reducing a prescribed dosage ofanti-depressants when the data indicates an improvement in the patient'sability to maintain a relaxed breathing state while using the device.

The characteristics detected from the ECG signal may include thebreathing rate and/or HRV detected by the ECG analysis unit 102, and mayfurther include other characteristics such as any abnormalities detectedby the abnormality detection mechanism 105. The feedback generator 103is further configured to control the feedback output mechanism 104 tooutput audiovisual feedback synchronised to the optimal breathing rate,and subsequently adapt the audiovisual feedback in accordance withchanges in the one or more heart rate and/or breathing ratecharacteristics while the audiovisual feedback is being outputted. Insome embodiments, other types of sensory feedback may also be providedin addition to audiovisual feedback. In the present embodiment, thefeedback generator 103 can control the speaker 104 a included in thefeedback output mechanism 104 to provide haptic feedback in the form oflow-frequency audio. In another embodiment, a dedicated haptic feedbackmechanism may be provided.

In the present embodiment the feedback generator 103 includes an audiomixer configured to play overlapped sample streams stored incomputer-readable memory. The feedback generator 103 can control theaudio mixer to generate audio output with a rhythm that is synchronisedto the heartbeat or breathing rate of the user. In some embodiments thegenerated audiovisual feedback may be configured to include specificaudio and/or visual cues for instructing a user when to inhale and whento exhale, in accordance with the determined optimal breathing rate.However, in other embodiments the audiovisual feedback can be configuredto increase or decrease a user's heart rate and/or breathing ratewithout the use of specific cues, for example by using audio and visualoutput that are known to be generally soothing to a user, such as subtlychanging blue/green light patterns and relaxing music/sounds.

As shown in FIG. 1, the device of the present embodiment furthercomprises an abnormality detection mechanism 105 configured to detectone or more predefined abnormalities based on the determined heart ratevariability and/or breathing rate, and to signal a detected abnormalityto the feedback generator. The feedback generator can then obtain theoptimal breathing rate in accordance with the detected abnormality.However, in other embodiments abnormality detection may not beperformed, and accordingly the abnormality detection mechanism 105 maybe omitted.

Examples of abnormalities that can be detected by the abnormalitydetection mechanism 105 include, but are not limited to: an indicator ofhigh stress; atrial fibrillation; cardiomyopathy; autonomic neuropathy.In some embodiments, the device may be configured to issue an alert tothe user and/or a healthcare professional in response to a certain typeof abnormality being detected, such as an abnormality that may indicatea need for immediate medical attention.

As shown in FIG. 1, the device 100 further comprises a network interface106 for communicating with one or more other devices over a network 120.Depending on the embodiment, various processing steps may be performedremotely by communicating with a suitable network device, for example acloud server. That is, functions of the ECG analysis unit 102, feedbackgenerator 103 and abnormality detection mechanism 105 can be performedeither locally or remotely. For example, in the present embodiment theabnormality detection mechanism 105 is configured to detect the one ormore predefined abnormalities by transmitting the ECG signal to adiagnostic server 110 via the network interface 106 and receiving adiagnostic result indicating whether any of the predefined abnormalitieswere detected in the ECG signal.

In some embodiments, a cloud server 110 may store data received from thedevice 100 in a database 111. For example, the server no may store acopy of the ECG signal received from the device 100, and/or informationabout characteristics detected from the ECG signal, such as HRV,breathing rate and any abnormalities present in the ECG signal. Theinformation in the database in could be accessed by the user and/orhealth professionals at a later stage, for example in order to diagnosecertain medical conditions or to monitor a patient's state duringhospital waiting periods. Additionally, by storing a record of a dataobtained by the device over longer time periods for a particularindividual, a baseline of heart rate activity for the individual can beobtained. Certain conditions may be diagnosed by detecting a significantvariation from the baseline, for example a substantial change in HRV orvagal balance.

Referring now to FIG. 2, a flowchart showing a method for providingfeedback regarding breathing rate is illustrated, according to anembodiment. Depending on the embodiment, certain steps in the method maybe performed locally at the device, or may be performed remotely on aserver.

First, in step S201 a new ECG signal is detected when the user picks upthe device and touches the ECG electrodes. Then, in step S202 the ECGanalysis unit 102 obtains a breathing rate from the received ECG signal.In the present embodiment, the ECG analysis unit 102 also obtainsinformation about HRV, as described above. Depending on the embodiment,the ECG analysis unit 102 may determine the breathing rate and/or HRVinformation locally, or may transmit the ECG signal to a diagnosticserver and receive information about the detected breathing rate and/orHRV.

Next, in step S203 the feedback generator 103 obtains the optimalbreathing rate in accordance with a desired outcome and one or moreheart rate and/or breathing rate characteristics detected from the ECGsignal. Depending on the embodiment, the feedback generator 103 maydetermine the optimal breathing rate locally or may receive the optimalbreathing rate from a server.

Then, in step S204 the feedback generator 103 controls the feedbackoutput mechanism 104 to output audiovisual feedback synchronised to theoptimal breathing rate. As shown in FIG. 2, while the audiovisualfeedback is being outputted, the feedback generator proceeds tocontinuously monitor the breathing rate via the ECG signal andsubsequently adapt the audiovisual feedback in accordance with anychanges detected. Specifically, in step S205 the ECG analysis unit 102continues to monitor the breathing rate from the ECG signal, and thefeedback generator 103 checks in step S206 whether the current breathingrate is within the optimal range, that is to say, within acceptablelimits of the optimal breathing rate. If the breathing rate is outsidethe optimal range, then the feedback generator 103 adapts theaudiovisual feedback as necessary in step S207 in order to encourage theuser to raise or lower their breathing rate. Steps S205, S206 and S207are repeated until the ECG signal is lost in step S208, for example whenthe user lets go of the device 100. Once the ECG signal is lost, thefeedback generator 103 ceases to provide audiovisual feedback in stepS209.

By continuously adapting the audiovisual feedback as shown in FIG. 2,the device is able to respond to changes in the user's heart rate and/orbreathing rate whilst performing a breathing exercise, to keep thebreathing rate within the optimal range. However, in some cases a usermay not be able to perform the breathing exercise correctly. Forexample, a medical condition may prevent the user from achieving theoptimal breathing rate. In some embodiments, the optimal breathing ratemay be recalculated in response to a determination that the user is notable to achieve the optimal breathing rate. A method for determiningwhether the user is correctly performing the breathing exercise will nowbe described with reference to FIG. 3.

FIG. 3 illustrates a method of obtaining a performance metric related tohow closely the breathing rate detected from the ECG signal is matchedto the optimal breathing rate, according to an embodiment. In thisembodiment, the feedback generator 103 is configured to generate afeedback control signal which is used to control the feedback outputmechanism 104 to signal to the user when to exhale and when to inhale.The feedback generator 103 uses the feedback control signal as areference signal to which the user's actual breathing pattern can becompared.

In the present embodiment the control signal is encoded as a continuoussignal taking values between −1 and +1, with −1 corresponding to the endof the exhalation phase and +1 corresponding to the end of theinhalation phase. However, in other embodiments different upper andlower limits may be used, and the limits may correspond to other definedpoints in the inhalation and exhalation cycles.

First, in step S301 an ECG signal is received, and a control signal isgenerated according to the determined optimal breathing rate. Then, insteps S302A and S302B the feedback generator 103 is configured to obtaina first filtered signal by applying a moving average filter with a firsttime window to the received ECG signal, and obtain a second filteredsignal by applying a moving average filter with a second time window tothe received ECG signal, the second time window being longer than thefirst time window. The first time window is selected to filter out noisein the ECG signal, and the second time window is selected to smooth outvariations within one breathing period to produce a baseline.Investigations by the inventors have shown that a first time window ofsubstantially equal to 3 seconds (s) and a second time window ofsubstantially equal to 17 s are optimal in most circumstances, howeverother values for the time windows may be used as required. The secondtime window should be at least as long as one breathing period, and maybe adjusted as the user's breathing rate increases or decreases.

Then, in step S303 the feedback generator 103 subtracts the secondfiltered signal from the first filtered signal to obtain a differencebetween the two filtered signals. The difference signal providesinformation about Respiratory Sinus Arrhythmia (RSA). In step S304determines the maximum and minimum values within a certain time window.In the present embodiment the maximum and minimum values within at leastone breathing period are determined, and the time window in step S304may be substantially equal to the second time window, for example 17 s.In some embodiments the time window in step S304 may be different to thesecond time window used in step S302B. For example, a longer time windowcould be used in step S304, although this will result in increasedlatency.

Next, in step S305 the difference signal is normalised relative to thecontrol signal, based on the determined maximum and minimum values. Inthis way the feedback generator 103 obtains a normalised signal havingvalues ranging from the first limit of the control signal to the secondlimit of the control signal. Hence in the present example the normalisedsignal has values between the limits of −1 and +1. Normalising thesignal based on the detected maximum and minimum values ensures that thedifference signal is correctly normalised, since the RSA can change fromuser to user.

Then, in step S306 the feedback generator 103 obtains a performancemetric based on a correlation between the normalised signal and thecontrol signal. In the present embodiment the performance metric isobtained by cross-correlating the normalised signal with the controlsignal. In this way, a performance metric is obtained which is relatedto how closely the breathing rate detected from the ECG signal ismatched to the optimal breathing rate, as indicated by the controlsignal.

The performance metric is therefore related to the quality with whichthe breathing exercise is being executed by the user, and is an estimateof how synchronously RSA is reacting to the breathing exercise. RSA is anatural phenomenon that occurs with every breathing cycle. When thebreathing exercise is executed correctly, that is, when a user isbreathing synchronously with the audio and/or visual breathing cuesprovided by the audiovisual feedback, RSA will be synchronized with thecontrol signal. As a result the cross correlation will be high. On theother hand, not following the breathing cues correctly will produce RSAthat is not synchronized with the control signal, and as a result thecross correlation will be low.

The device can be configured to track the executed quality throughoutthe length of the breathing exercise, by regularly calculating anupdated value of the performance metric. In this way the device candetect when execution quality increases or decreases, for example if theuser stops following the audio and/or visual cues, or if RSA is notsuccessfully triggered. The device is then able to adapt the visual andaudio feedback by changing colour hues and the musical patterns, toillustrate to the user that the suggested breathing rate is not beingfollowed accurately enough, and to remind them to breathediaphragmatically instead of from the chest, whereby the effect of thebreathing exercise might be reduced. The value of the performance metricmay be recorded over time, and can be uploaded to a server for accessingby a healthcare professional. The performance metric can provideinformation about long-term trends in the user's performance in thebreathing exercise, and their ability to achieve and maintain a relaxedstate while using the device. In some embodiments the feedback may beadapted in accordance with the current value of the performance metric.For example, when the performance metric indicates a high executionquality, the feedback generator can be configured to include specificfeedback elements as a reward (e.g. high notes), to signal to the userthat the exercise is being performed correctly.

Referring now to FIGS. 4 to 6, a device for providing feedback regardingbreathing rate is schematically illustrated, according to an embodiment.A top view of the device is shown in FIG. 4, a bottom view is shown inFIG. 5, and an exploded view is shown in FIG. 6. In the presentembodiment, the device 400 is configured to be held and supported by auser, and includes first and second ECG electrodes 401 a, 401 b disposedon a surface of the device 400. The first and second ECG electrodes 401a, 401 b are arranged to detect the ECG signal when the device 400 isheld by a user, and in the present embodiment are disposed on oppositesides of the device 400. In addition to the first and second ECGelectrodes 401 a, 401 b, the device 400 of the present embodimentfurther includes a reference ECG electrode 401 c arranged to contactboth hands when the device is being held by the user. The ECG analysisunit is configured to measure a reference potential from the referenceECG electrode 401 c when receiving the ECG signal through the first andsecond ECG electrodes 401 a, 401 b.

Using a reference point in this way is advantageous when the device isphysically connected to other electronic equipment, for example througha Universal Serial Bus (USB) cable or a power adapter. The referenceelectrode 401 c ensures that the user is at a similar potential as thesignal reference, and reduces common mode interference.

However, in some embodiments the reference electrode 401 c can beomitted. When the device is not electrically connected to otherequipment, the reference potential is free to float at the averagepotential of the first and second ECG electrodes 401 a, 401 b.

FIGS. 4 to 6 also illustrate various components of the feedback outputmechanism. As shown in FIG. 4, the feedback output mechanism of thepresent embodiment includes a plurality of multi-coloured LEDs 404 bdistributed throughout the device 400. Although LEDs are used in thepresent embodiment, in other embodiments different types of light sourcemay be used, for example an LCD display may be included. In the presentembodiment the LEDs 404 b are disposed across an upper surface of thedevice 400, so as to be visible to the user when the device 400 is heldin front of the body. The feedback generator can control the LEDs inorder to change the colour of the device, for example to allow a gentlychanging glow to be created which can be soothing for the user, and helpto reduce their HRV and breathing rate. Experiments carried out by theinventors have shown that a change between blue and green is relaxingfor most users.

Additionally, the feedback output mechanism in the present embodimentfurther comprises a speaker 404 a and speaker grille 407 in the body ofthe device 400. The speaker 404 a is disposed centrally in the device400 in order to make the device 400 easier to hold comfortably, byensuring that the weight of the device 400 is evenly distributed betweenboth hands. Furthermore, the speaker 404 a in the present embodiment isof a sufficient size to be able to provide haptic feedback in the formof low frequency audio.

Whilst certain embodiments have been described herein with reference tothe drawings, it will be understood that many variations andmodifications will be possible without departing from the scope of theinvention as defined in the accompanying claims.

1. A device comprising: a sensor interface configured to receive anelectrocardiogram ECG signal; an ECG analysis unit configured to obtaina breathing rate from the received ECG signal; a feedback outputmechanism for providing feedback; and a feedback generator configured toobtain an optimal breathing rate in accordance with a desired outcomeand one or more heart rate and/or breathing rate characteristicsdetected from the ECG signal, control the feedback output mechanism tooutput feedback synchronised to the optimal breathing rate, andsubsequently adapt the feedback in accordance with changes in the one ormore heart rate and/or breathing rate characteristics while the feedbackis being outputted.
 2. The device of claim 1, wherein the feedbackgenerator is configured to generate a feedback control signal havingvalues ranging from a first limit to a second limit, the first limitcorresponding to a defined point in an exhalation phase and the secondlimit corresponding to a defined point in an inhalation phase, andwherein the feedback output mechanism is configured to provide thefeedback in accordance with the feedback control signal.
 3. The deviceof claim 2, wherein the feedback generator is configured to: obtain afirst filtered signal by applying a moving average filter with a firsttime window to the received ECG signal; obtain a second filtered signalby applying a moving average filter with a second time window to thereceived ECG signal, the second time window being longer than the firsttime window; obtain a difference signal by subtracting the secondfiltered signal from the first filtered signal; determine a maximumvalue and a minimum value of the difference signal within a third timewindow; normalise the difference signal relative to the control signalbased on the determined maximum and minimum values, to obtain anormalised signal having values ranging from the first limit of thecontrol signal to the second limit of the control signal; and obtain aperformance metric based on a correlation between the normalised signaland the control signal, where the performance metric is related to howclosely the breathing rate detected from the ECG signal is matched tothe optimal breathing rate.
 4. The device of claim 3, wherein the firsttime window is substantially equal to 3 seconds, and/or the second timewindow is substantially equal to 17 seconds.
 5. The device of claim 1,wherein the feedback is configured to include cues for instructing auser when to inhale and when to exhale, in accordance with thedetermined optimal breathing rate.
 6. The device of claim 1, furthercomprising: an abnormality detection mechanism configured to detect oneor more predefined abnormalities based on the determined heart ratevariability and/or breathing rate, and to signal a detected abnormalityto the feedback generator, wherein the feedback generator is furtherconfigured to obtain the optimal breathing rate in accordance with thedetected abnormality.
 7. The device of claim 6, further comprising: anetwork interface for communicating with one or more other devices overa network, wherein the abnormality detection mechanism is configured todetect the one or more predefined abnormalities by transmitting the ECGsignal to a diagnostic server via the network interface and receiving adiagnostic result indicating whether any of the predefined abnormalitieswere detected in the ECG signal.
 8. The device of claim 1, furthercomprising: a network interface for communicating with one or more otherdevices over a network, wherein the ECG analysis unit is configured toobtain the breathing rate by transmitting the ECG signal to a server viathe network interface, and receiving a message containing the detectedbreathing rate via the network interface, and/or wherein the feedbackgenerator is configured to obtain the optimal breathing rate by queryinga server via the network interface.
 9. The device of claim 1, whereinthe feedback output mechanism comprises: a plurality of light sourcesdistributed across the device, the plurality of light sources beingcontrollable to emit visible light of different wavelengths inaccordance with the generated feedback.
 10. The device of claim 1,wherein the feedback output mechanism comprises: a speaker foroutputting an audio component of the generated feedback, and wherein thefeedback generator is further configured to control the speaker toprovide haptic feedback in the form of low-frequency audio.
 11. Thedevice of claim 1, configured to be held and supported by a user,wherein the sensor interface comprises: first and secondelectrocardiographic electrodes disposed on a surface of the device, thefirst and second electrocardiographic electrodes being arranged todetect the ECG signal when the device is held by the user.
 12. Thedevice of claim 11, further comprising: a third electrocardiographicelectrode arranged to contact both hands when the device is being heldby the user, wherein the ECG analysis unit is configured to measure areference potential from the third electrocardiographic electrode whenreceiving the ECG signal through the first and secondelectrocardiographic electrodes.
 13. The device of claim 1, wherein theECG analysis unit is configured to determine the breathing rate as beingequal to a variation in peak amplitude of a pulse detected from the ECGsignal.
 14. A method comprising: receiving an electrocardiogram ECGsignal; obtaining a breathing rate from the received ECG signal;obtaining an optimal breathing rate in accordance with a desired outcomeand one or more heart rate and/or breathing rate characteristicsdetected from the ECG signal; controlling a feedback output mechanism tooutput feedback synchronised to the optimal breathing rate; andsubsequently adapting the feedback in accordance with changes in the oneor more heart rate and/or breathing rate characteristics while thefeedback is being outputted.
 15. A non-transitory computer-readablestorage medium on which is stored computer program instructions which,when executed, perform the method according to claim 14.